package com.cykj.user.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @BelongsProject: smart_recruit_backend
 * @BelongsPackage: com.cykj.user.config
 * @Author: 浮行
 * @CreateTime: 2025-08-19 14:33
 * @Description: TODO
 * @Version: 1.0
 */
@Configuration
public class StaticConfig implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        // 将本地路径D:\staticFile映射到URL路径/static/**
        registry.addResourceHandler("/static/**")  // URL访问路径：http://127.0.0.1:7071/static/文件名
                .addResourceLocations("file:D:/staticFile/");  // 本地文件路径
    }
}
